/*
 * Copyright 2012-2021 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.boot.autoconfigure.quartz;

import javax.sql.DataSource;

import org.springframework.scheduling.quartz.SchedulerFactoryBean;

/**
 * 一个回调接口，供希望在 Quartz 的 {@link SchedulerFactoryBean} 完全初始化之前进行
 * 自定义配置的 Bean 实现，特别是用于调整其配置参数。
 * <p>
 * 如果需要自定义 Quartz 所使用的 {@link DataSource}，推荐使用
 * {@link QuartzDataSource @QuartzDataSource} 注解。这可以确保对
 * {@link SchedulerFactoryBean} 和 {@link QuartzDataSourceScriptDatabaseInitializer}
 * 进行一致性的配置。
 *
 * @author Vedran Pavic
 * @since 2.0.0
 */
@FunctionalInterface
public interface SchedulerFactoryBeanCustomizer {

	/**
	 * 自定义 {@link SchedulerFactoryBean}。
	 * @param schedulerFactoryBean 要自定义的调度器工厂 Bean
	 */
	void customize(SchedulerFactoryBean schedulerFactoryBean);

}
